<?php $this->load->view('header'); ?>
<div id="main">
	<ul id="post_list">
	<?php foreach ($posts as $post) : ?>
		<li class="post-<?php echo $post->post_id; ?> post">
			<h2><a href="<?php echo base_url().'post/'.$post->post_id; ?>" title="<?php echo $post->post_title; ?>"><?php echo $post->post_title; ?></a></h2>
			<div class="meta"><?php echo date("Y-m-d",$post->post_date); ?> <?php echo $this->lang->line('default_by'); ?> <?php echo get_the_user_list($post->post_author, ', '); ?></div>
			<div class="excerpt">
				<p><?php   echo mb_strimwidth(strip_tags($post->post_content), 0,300,"..."); ?></p>
				<div class="meta"><?php echo $this->lang->line('default_category'); ?>: <?php echo get_the_category_list($post->cat, ', '); ?> | <?php echo $this->lang->line('default_tag'); ?>: <?php echo get_the_tag_list($post->tag, ', '); ?></div>
				<div class="comments_num">
					<?php if($post->post_comment_count > 0) : ?>
						<a title="<?php printf($this->lang->line('default_comment_title'),$post->post_title); ?>" href="<?php echo base_url().'post/'.$post->post_id; ?>#comments"><?php echo $post->post_comment_count; ?> <?php echo $this->lang->line('default_comment_num'); ?></a>
					<?php else : ?>
						<a title="<?php printf($this->lang->line('default_comment_title'),$post->post_title); ?>" href="<?php echo base_url().'post/'.$post->post_id; ?>#respond"><?php echo $this->lang->line('default_comment_submit'); ?></a>
					<?php endif; ?>
				</div>
			</div>
		</li>
	<?php endforeach; ?>
	</ul>
	<?php echo $pagination ?>
</div><!-- #main -->
<?php $this->load->view('sidebar'); ?>
<?php $this->load->view('footer'); ?>

